package com.ytf.test.seventh;

/**
 * @author: YTF
 * @date: 2024/9/26 14:42
 * @version: 1.0
 * @description:
 */
public class SprinklerSystem {
    private String value1,value2,value3,value4;
    private WaterSource waterSource= new WaterSource();
    private int i;
    private float f;

    public static void main(String[] args) {
        SprinklerSystem sprinklerSystem = new SprinklerSystem();
        System.out.println(sprinklerSystem);
        /**
         * Output:
         * WaterSource()
         * SprinklerSystem{value1='null', value2='null', value3='null', value4='null', waterSource=WaterSource{s='Constructed'}, i=0, f=0.0}
         *
         */
    }

    @Override
    public String toString() {
        return "SprinklerSystem{" +
                "value1='" + value1 + '\'' +
                ", value2='" + value2 + '\'' +
                ", value3='" + value3 + '\'' +
                ", value4='" + value4 + '\'' +
                ", waterSource=" + waterSource +
                ", i=" + i +
                ", f=" + f +
                '}';
    }
}
class WaterSource{
    private String s;

    public WaterSource() {
        System.out.println("WaterSource()");
        s="Constructed";
    }

    @Override
    public String toString() {
        return "WaterSource{" +
                "s='" + s + '\'' +
                '}';
    }
}
